package com.rpframework.website.device.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.rpframework.core.BaseService;
import com.rpframework.utils.Pager;
import com.rpframework.website.device.dao.IDynamicDao;
import com.rpframework.website.device.domain.Dynamic;
@Service
public class DynamicService extends BaseService{
	@Resource IDynamicDao iadao;
	
	
	public Pager<Dynamic> getpager(Pager<Dynamic> pager) {
		long startTime=System.currentTimeMillis();
		List<Dynamic>  list=iadao.doPager(this.packageMyBatisParam(pager));
		pager.setItemList(list);
		pager.setCostTime(System.currentTimeMillis() - startTime);
		return pager;
	}


	public Dynamic selectOnlyOne(int parseInt) {
		// TODO Auto-generated method stub
		return iadao.select(parseInt);
	}


	public boolean insertdo(Dynamic dynamic) {
		
		
		return iadao.insert(dynamic);
	}


	public boolean updatewiden(Dynamic dynamic) {
		// TODO Auto-generated method stub
		return iadao.update(dynamic);
	}


	public List<Dynamic> selectBytime(String datime, Integer propertyid) {
		// TODO Auto-generated method stub
		return iadao.selectBytime(datime,propertyid);
	}
}
